package design.simdi.code.final_paper.site.panels.proiecte;

import java.util.ArrayList;
import java.util.List;

import org.apache.wicket.extensions.markup.html.tabs.AbstractTab;
import org.apache.wicket.extensions.markup.html.tabs.TabbedPanel;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.ResourceModel;

import design.simdi.code.final_paper.site.panels.PageContentPanel;
import design.simdi.code.final_paper.site.panels.proiecte.bibliografie.BibliografieTabPanel;
import design.simdi.code.final_paper.site.panels.proiecte.idei.IdeiTabPanel;
import design.simdi.code.final_paper.site.panels.proiecte.keywords.CuvinteCheieTabPanel;

/**
 * 
 * @author Marius Dumitriu - (Jun 21, 2010 - 3:00:12 PM)
 * 
 */
public class ProiectePageContentPanel extends PageContentPanel {

	private static final long serialVersionUID = 1L;

	@SuppressWarnings("unchecked")
	private List tabs;

	public ProiectePageContentPanel(String id) {
		super(id);
	}

	public ProiectePageContentPanel(String id, IModel<?> model) {
		super(id, model);
	}

	@SuppressWarnings("unchecked")
	@Override
	public void panelInit() {
		setOutputMarkupId(true);
		tabs = new ArrayList<AbstractTab>();
		tabs.add(new AbstractTab(new ResourceModel("idei")) {

			private static final long serialVersionUID = 1L;

			public Panel getPanel(String panelId) {
				return new IdeiTabPanel(panelId);
			}

		});
		tabs.add(new AbstractTab(new ResourceModel("keywords")) {

			private static final long serialVersionUID = 1L;

			public Panel getPanel(String panelId) {
				return new CuvinteCheieTabPanel(panelId);
			}

		});
		tabs.add(new AbstractTab(new ResourceModel("bibliographies")) {

			private static final long serialVersionUID = 1L;

			public Panel getPanel(String panelId) {
				return new BibliografieTabPanel(panelId);
			}

		});

		add(new TabbedPanel("tabs", tabs));
	}
}
